package transport

import "ws-demo-go/internal/transport/server"

type hookAdapter struct {
	onConnected    func(transConn *server.Connection)
	onDisconnected func(transConn *server.Connection)
	onMessage      func(transConn *server.Connection, data []byte)
}

func (h *hookAdapter) OnConnected(transConn *server.Connection) {
	h.onConnected(transConn)
}
func (h *hookAdapter) OnDisconnected(transConn *server.Connection) {
	h.onDisconnected(transConn)
}
func (h *hookAdapter) OnMessage(transConn *server.Connection, data []byte) {
	h.onMessage(transConn, data)
}
